package com.len.service;

import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class PageService {

  @Resource
  private MongoTemplate mongoTemplate;

  public long count(Query query,Class clazz){

    return mongoTemplate.count(query.skip(0).limit(0),clazz);
  }

}
